package com.qfjy.homework.wangzhi;

/**
 * @author wz
 * @date 2022-03-21 05:37
 * @Description:
 */

public class SpeedVehicleDecorator extends VehicleDecorator {
    public SpeedVehicleDecorator(Vehicle decoratedVehicle) {
        super(decoratedVehicle);
    }

    @Override
    public void type() {
        decoratedVehicle.type();
        setSpeed(decoratedVehicle);
    }
    public void setSpeed(Vehicle decoratedVehicle){
        System.out.println("速度比步行快");
    }
}
